<template>
  <view>
    <view class="list">
      <view class="grid-text1" v-for="(item, keys) in menu.menu[0]" :key="keys">
        <!-- <view >
          {{ item }} -->
          <u-tag
            @click="Toarticle(keys)"
            :text="item"
            :color="color"
            :borderColor="color"
            plain
          >
          </u-tag> 
        <!-- </view> -->
        </view
      >
    </view>
  </view>
</template>

<script>
export default {
  props: {},
  data() {
    return {
      query: {
        row: "",
      },
      menu: "",
      color: "black",
    };
  },

  onLoad(option) {
    // console.log(option.row); //打印出上个页面传递的参数。
    this.query.row = option.row;
    this.menu = require("../../static/json/json_shengjing" +
      this.query.row +
      ".json");

    // console.log(this.menu);
  },

  methods: {
    Toarticle(page) {
      // console.log(page);

      uni.navigateTo({
        url:
          "../detail/article?row=" +
          this.query.row +
          "&page=" +
          Number(page + 1),
      });
    },
  },
};
</script>

<style scoped>
.list {
  display: flex;
  flex-wrap: wrap;
  /* width: 100%; */
  padding: 10upx;
}
.grid-text1 {
  width: 24%;
  margin: 10upx 0.5%;
  text-align: center !important;
}
</style>
<style>

</style>